package com.idea.zd.sys.te;

import java.util.Map;

import com.google.common.collect.Maps;

public class TeLaiDianConfig {


	public  static String SIGN_KEY = "1234567890abcdef";//MD5密钥
	public  static String OPERATOR_SECRET = "1234567890abcdef"; //
	public  static String AES_KEY = "1234567890abcdef"; //AES密钥
	public  static String AES_IV = "1234567890abcdef";//AES向量
//	
	public  static String OPERATOR_ID = "123456789"; //9位组织机构代码
//	// open平台地址
	public  static String URL = "http://api.wyqcd.cn:9101/evcs/v20161110/";

	
	private static  Map<Integer,String> failReasonMap = Maps.newHashMap();
//	private static String DEPLOY_MODEL = LoadPropertiesUtil.getProperties("common.properties", "deployModel");
	
	 static{
		 
//		 if(DeployModel.test.equalsIgnoreCase("test")){
			SIGN_KEY = "1234567890abcdef";
			OPERATOR_SECRET = "1234567890abcdef";
			AES_KEY = "1234567890abcdef";
			AES_IV = "1234567890abcdef";
			URL = "http://api.wyqcd.cn:9101/evcs/v20161110/";
//		 }
		
		failReasonMap.put(1	,"用户余额不足，请充值后再充电");
		failReasonMap.put(5	,"未找到用户");
		failReasonMap.put(6	,"未找到终端");
		failReasonMap.put(7	,"通信故障");
		failReasonMap.put(8	,"已经充电，不能重复充电");
		failReasonMap.put(9	,"该电站尚未运营");
		failReasonMap.put(10,"终端正在服务中，请选择其他终端");
		failReasonMap.put(11,"充电枪未与车连接");
		failReasonMap.put(16,"已经结束充电，不能重复结束充电");
		failReasonMap.put(17,"开始充电异常");
		failReasonMap.put(19,"终端离网，请选择其他终端");
		failReasonMap.put(21,"操作过于频繁，请稍后再试");
		failReasonMap.put(24,"终端故障不允许充电");
		failReasonMap.put(25,"此终端为调度充电，不允许app充电");
		failReasonMap.put(38,"结束充电失败");
		failReasonMap.put(43,"终端未响应");
		failReasonMap.put(44,"有未支付的充电订单,不允许开启充电");
		failReasonMap.put(53,"强制创建订单异常");
		failReasonMap.put(54,"充电机故障,请选择其他终端");
		failReasonMap.put(55,"BMS故障,请选择其他终端");
		failReasonMap.put(56,"连接故障,请选择其他终端");
	}
	
	public static String getFailReason(int failReason){
		if(failReasonMap.containsKey(failReason)){
			return failReasonMap.get(failReason);
		}else{
			return "未知错误";
		}
	}
}
